package com.haoyeteng.sxbd.modular.business.model;

import java.io.Serializable;

import com.baomidou.mybatisplus.annotations.TableLogic;
import com.baomidou.mybatisplus.enums.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;
import java.io.Serializable;

/**
 * <p>
 * 新闻表
 * </p>
 *
 * @author haoyeteng123
 * @since 2019-06-11
 */
@TableName("bus_news")
public class News extends Model<News> {

    private static final long serialVersionUID = 1L;

    /**
     * 新闻Id
     */
    @TableId(value = "news_id", type = IdType.AUTO)
    private Integer newsId;
    /**
     * 新闻分类Id
     */
    @TableField("category_id")
    private Integer categoryId;
    /**
     * 新闻标题
     */
    @TableField("news_name")
    private String newsName;

    /**
     * 新闻首图
     */
    @TableField("news_pic")
    private String newsPic;
    /**
     * 新闻简介
     */
    @TableField("news_desc")
    private String newsDesc;
    /**
     * 新闻排序值
     */
    @TableField("news_num")
    private Integer newsNum;
    /**
     * 新闻内容
     */
    @TableField("news_details")
    private String newsDetails;
    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;
    /**
     * 更新时间
     */
    @TableField("update_time")
    private Date updateTime;
    /**
     * 删除标记
     */
    @TableField("flag")
    @TableLogic
    private Integer flag;


    public Integer getNewsId() {
        return newsId;
    }

    public void setNewsId(Integer newsId) {
        this.newsId = newsId;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }

    public String getNewsName() {
        return newsName;
    }

    public void setNewsName(String newsName) {
        this.newsName = newsName;
    }

    public String getNewsPic() {
        return newsPic;
    }

    public void setNewsPic(String newsPic) {
        this.newsPic = newsPic;
    }
    public String getNewsDesc() {
        return newsDesc;
    }

    public void setNewsDesc(String newsDesc) {
        this.newsDesc = newsDesc;
    }

    public Integer getNewsNum() {
        return newsNum;
    }

    public void setNewsNum(Integer newsNum) {
        this.newsNum = newsNum;
    }

    public String getNewsDetails() {
        return newsDetails;
    }

    public void setNewsDetails(String newsDetails) {
        this.newsDetails = newsDetails;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Integer getFlag() {
        return flag;
    }

    public void setFlag(Integer flag) {
        this.flag = flag;
    }

    @Override
    protected Serializable pkVal() {
        return this.newsId;
    }

    @Override
    public String toString() {
        return "News{" +
        "newsId=" + newsId +
        ", categoryId=" + categoryId +
        ", newsName=" + newsName +
        ", newsDesc=" + newsDesc +
        ", newsNum=" + newsNum +
        ", newsPic=" + newsPic +
        ", newsDetails=" + newsDetails +
        ", createTime=" + createTime +
        ", updateTime=" + updateTime +
        ", flag=" + flag +
        "}";
    }
}
